const mongoose = require('mongoose')
const Schema = mongoose.Schema
const ContrastSchemaConfig = {
  versionKey: false
}

const ContrastSchema = new Schema({
  term: Number,
  subjects: [{
    interest: { type: Schema.Types.ObjectId, ref: 'Interest' },
    weight: Number
  }],
  averages: [{
    bucket: { type: Schema.Types.ObjectId, ref: 'ContrastBucket' },
    point: Number
  }]
}, ContrastSchemaConfig)

exports = module.exports = ContrastSchema
